#
# @lc app=leetcode.cn id=1422 lang=python
#
# [1422] 分割字符串的最大得分
#

# @lc code=start
class Solution(object):
    def maxScore(self, s):
        """
        :type s: str
        :rtype: int
        """
        return max(s[:i].count('0')+s[i:].count('1') for i in range(1,len(s)))
# @lc code=end

